#include <optional>
#include <iostream>

std::optional<int> get_even_number(int num) {
    if (num % 2 == 0) return num;
    return std::nullopt; // 返回一个空的 std::optional 对象
}

int main() {
    auto result = get_even_number(3);
    if (result.has_value()) {
        std::cout << "Even number: " << result.value() << '\n';
    } else {
        std::cout << "No even number provided.\n";
    }
}